

export const useCommonStore = defineStore('common', () => {
    const idsRef = ref([]); // 删除ids
    const isShowDetailDrawer = ref(false); // 是否展示详情抽屉
    const isClearFormRef = ref(false); // 是否清空过滤表单
   
    function updateIds (payload:[]) {
        idsRef.value = payload;
    }

    function setIsClearForm (bool:boolean) {
        isClearFormRef.value = bool;
    }

    // @ts-ignore
    const setIsShowDetailDrawer = (bool:boolean) => {
        isShowDetailDrawer.value = bool;
    }

    return {
        idsRef,
        updateIds,
        isShowDetailDrawer,
        setIsShowDetailDrawer,
        isClearFormRef,
        setIsClearForm,
    }
});
